Technical Q&As


QTW 86 - Using Mac-style Resources (21-September-98)


Q I'd like to use Mac-style resources in a Windows 98/95/NT application, or DLL using QuickTime 3 for Windows. I have been able to incorporate the resources into my application using the RezWack utility, but QuickTime still cannot find them. What's wrong?

A You need to open your program's resource file first using the QuickTime 3 for Windows FSpOpenResFile function. Here's a code snippet:

// Just after InitializeQTML() call
char szAppPathName[256];
FSSpec	resFSSpec;

GetModuleFileName(0, szAppPathName, 256);
NativePathNameToFSSpec(szAppPathName,&resFSSpec,kFullNativePath);

appResID = FSpOpenResFile(&resFSSpec, fsRdPerm);

....

// Just before TerminateQTML() call
if (appResID != -1)
     CloseResFile(appResID);




-- Scott Kuechle
Worldwide Developer Technical Support

Technical Q&As
Previous Question | Contents | Next Question

To contact us, please use the Contact Us page.